<script>
import CodeShow from './CodeShow.vue'
import { codeText2 } from './codetext';

export default {
  components: {
    CodeShow
  },
  props: {
    msg: String
  },
  data() {
    return {
      count: 0,
      codeText2
    }
  },
  methods: {
    increment() {
      this.count++
    }
  }
}

</script>

<template>
  <h2 class="title">{{ msg }}</h2>
  <button type="button" @click="increment">count is {{ count }}</button>
  <code-show :code-text="codeText2" />
</template>

<style scoped>
.title {
  color: red;
}
</style>
